<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //179000627 余倍

        //三角形
        for (let i = 0; i < 5; i++) {
            for (let j = 0; j < 5-i; j++) {
                document.write("&nbsp;");
            }
            for (let n = 0; n <=i; n++) {
                document.write(" * ");
            }
            document.write("<br>");
        }
        document.write("<hr>");

        //平行四边形
        for (let i = 0; i < 5; i++) {
            for (let j = 0; j < 5-i; j++) {
                document.write("&nbsp;");
            }
            for (let n = 0; n <5; n++) {
                document.write(" * ");
            }
            document.write("<br>");
        }

        document.write("<hr>");

        //菱形
        //菱形上面三角形
        for (let i = 0; i < 3; i++) {
            for (let j = 0; j < 3-i; j++) {
                document.write(" &nbsp; ");
            }
            for (let n = 0; n <2*i+1; n++) {
                document.write(" * ");
            }
            document.write("<br>");
        }
        //菱形下面三角形
        for (let i = 1; i <=2; i++) {
            for (let j = 0; j <= i; j++) {
                document.write(" &nbsp; ");
            }
            for (let n = 0; n <5-2*i; n++) {
                document.write(" * ");
            }
            document.write("<br>");
        }

    </script>
</head>
<body>

</body>
</html>